#include "my_stdio.h"
#include "my_string.h"
int main()
{
    char *msg = "xsdw";
    printf("字符串长度: %d\n", my_strlen(msg));

    // 文件读写测试
    MyFILE *fp = mfopen("log.txt", "w");
    if (fp == NULL)
        return -1;
    while (1)
    {
        mfwrite(fp, msg, strlen(msg));
        printf("%s\n", fp->outbuffer);
        sleep(1);
    }

    mfclose(fp);
}